<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/14
 * Time: 14:59
 */
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class SceneManage extends Model
{
    protected $table = 'tn_scene_manage';

    protected $fillable = [
        'account', 'hospital_ids'
    ];
    /* tds create
     * @param $account
     * @return hospital_ids array
     *  */
    public function getHospitalsByAccount($account)
    {
        $manageInfo = $this->getOne(['hospital_ids'], ['account' => $account]);

        if (!empty($manageInfo)) {
            return json_decode($manageInfo['hospital_ids']);
        }

        return '';
    }
}
